A=[1 4 1 2; 0 1 3 -4; 0 2 6 7; 2 9 5 -7];
A(4,:)=A(4,:)-2*A(1,:);
A(3,:)=A(3,:)-2*A(2,:);
A(4,:)=A(4,:)-A(2,:);
A(4,:)=A(4,:)+7/15*A(3,:);
A